import request from '@/utils/request'

// 查询入库记录主记录列表 (分页)
export function selectPageMaterialImportMaster(query) {
  return request({
    url: '/material/materialImportMaster/selectPage',
    method: 'get',
    params: query
  })
}

// 查询入库记录主记录列表 (不分页)
export function listMaterialImportMaster(query) {
  return request({
    url: '/material/materialImportMaster/list',
    method: 'get',
    params: query
  })
}

// 查询入库记录主记录详细
export function getMaterialImportMaster(importMasterId) {
  return request({
    url: '/material/materialImportMaster/' + importMasterId,
    method: 'get'
  })
}

// 新增入库记录主记录
export function addMaterialImportMaster(data) {
  return request({
    url: '/material/materialImportMaster',
    method: 'post',
    data: data
  })
}

// 修改入库记录主记录
export function updateMaterialImportMaster(data) {
  return request({
    url: '/material/materialImportMaster',
    method: 'put',
    data: data
  })
}

// 删除入库记录主记录
export function delMaterialImportMaster(importMasterId) {
  return request({
    url: '/material/materialImportMaster/' + importMasterId,
    method: 'delete'
  })
}

// 入库查询耗材加表
export function getAutoMaterialPriceInfo(query) {
  return request({
    url: '/material/materialImportMaster/getAutoMaterialPriceInfo' ,
    method: 'get',
    params: query
  })
}

// 确认入库
export function confirmImport(data) {
  return request({
    url: '/material/materialImportMaster/confirmImport',
    method: 'post',
    data: data
  })
}
